<%@ page import="com.ld.businesscard_manage.service.BusinessCardService" %>
<%@ page import="com.ld.businesscard_manage.service.impl.BusinessCardServiceImpl" %>
<%@ page import="com.ld.businesscard_manage.bean.BusinessCard" %>
<%@ page import="com.ld.businesscard_manage.bean.User" %><%--
  Created by IntelliJ IDEA.
  User: 刘邓
  Date: 2023-06-10
  Time: 16:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改我的名片</title>
    <style>
        .container {
            background-color: #fff;
            border-radius: 10px;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
            position: relative;
            overflow: hidden;
            width: 768px;
            max-width: 100%;
            min-height: 480px;
            margin:0 auto;
        }
        .container div{
            margin-top: 20px;
            margin-left: 40%;
        }

        input {
            background-color: #eee;
            border: none;
            padding: 12px 15px;
            margin: 8px 10px;
        }
    </style>
</head>
<body>
<%!
    private BusinessCardService cardService = new BusinessCardServiceImpl();
%>
<%
    BusinessCard card = cardService.getCardById(Integer.parseInt(request.getParameter("id")));
    session.setAttribute("currentCard",card);
    if(card.getValid() != 0) {
        response.sendRedirect("/home/myCard.jsp");
    }
%>
<form action="/home/changeMyCardOutcome.jsp" class="container">
    <div>姓名:<input type="text" name="name" placeholder="<%=card.getName()%>"></div>
    <div>性别:<input type="radio" name="sex" value="0" checked>男 &nbsp<input type="radio" name="sex" value="1">女</div>
    <div>邮箱:<input type="text" name="email" id="r_email" placeholder="<%=card.getEmail()%>"></div>
    <div style="padding-left: 30px"><input type="submit" value="修改" id="toAdd"></div>
</form>
</body>
</body>
</html>
